﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FlexFlow.Common
{
    /// <summary>
    /// 工具类
    /// </summary>
    public static class Toolkit
    {
        /// <summary>
        /// 取得客户端IP
        /// </summary>
        /// <returns>
        /// 取得的IP
        /// </returns>
        public static string GetClientIp()
        {
            try
            {
                string ip = System.Web.HttpContext.Current.Request.UserHostAddress;
                return ip;
            }
            catch (Exception)
            {
                return "UnKnown";
            }
        }
    }
}
